{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox-content layui-form">
        <div class="layui-row layui-col-space10 layui-form-item ">
            <input type="hidden" name="tui_id" value="{$tui.tui_id}">
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <label class="layui-form-label">收件人：</label>
                <div class="layui-input-block">
                    <input type="text" disabled class="layui-input " value="{$data.name}">
                </div>
            </div>
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <label class="layui-form-label">收件人电话：</label>
                <div class="layui-input-block">
                    <input type="text" disabled class="layui-input " value="{$data.mobile}">
                </div>
            </div>
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <label class="layui-form-label">收件人地址：</label>
                <div class="layui-input-block">
                    <input type="text" disabled class="layui-input " value="{$data.address}">
                </div>
            </div>
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <label class="layui-form-label">物流公司：</label>
                <div class="layui-input-block">
                    <input type="text" name="merchant_express" lay-verify="required" placeholder="请输入物流公司" class="layui-input " value="{$tui.merchant_express}">
                </div>
            </div>
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <label class="layui-form-label">物流单号：</label>
                <div class="layui-input-block">
                    <input type="text" name="merchant_express_no" lay-verify="required" placeholder="请输入物流单号" class="layui-input " value="{$tui.merchant_express_no}">
                </div>
            </div>
            <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                    </button>
                    <button class="layui-btn layui-btn-primary" onclick="wk.layer_close('close')">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>

{include file="public/footer" /}
<script>
    layui.use(['form'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('button').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('orderSend')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        $("button").removeClass('layui-disabled').removeAttr('disabled');
                        wk.error(res.msg);
                        return false;
                    }
                }
            })
        });
    });
</script>
</body>
</html>